library(semla)
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Loading required package: ggplot2
semla v1.1.6
Authors: Ludvig Larsson and Lovisa Franzen
control1 <- readRDS("/Users/christinacomo/OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/control1.semla.rds")
control2 <- readRDS("/Users/christinacomo/OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/control2.semla.rds")
mutant1 <- readRDS("/Users/christinacomo/OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/mutant1.semla.rds")
mutant2 <- readRDS("/Users/christinacomo/OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/mutant2.semla.rds")
head(spots.use)
[1] "AAAGTGTGATTTATCT-1" "AAAGTTGACTCCCGTA-1" "AACACACGCTCGCCGC-1" "AACCCTACTGTCAATA-1" "AACCGAGCTTGGTCAT-1" "AACCTCGCTTTAGCCC-1"
mutant1.men <- SubsetSTData(mutant1, spots = spots.use)
Error: object 'mutant1' not found
merge.all.int <- IntegrateLayers(
object = merge.all, method = CCAIntegration,
orig.reduction = "pca", new.reduction = "integrated.cca",
verbose = FALSE, k.weight = 65
)
| | 0 % ~calculating
|+++++++++ | 17% ~02s
|+++++++++++++++++ | 33% ~02s
|+++++++++++++++++++++++++ | 50% ~01s
|++++++++++++++++++++++++++++++++++ | 67% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=03s
Warning: Adding a dimensional reduction (integrated.cca) without the associated assay being present
# Normalize data and find variable features for Visium data
merge.all <- merge.all |>
NormalizeData() |>
FindVariableFeatures(nfeatures = 6000) |>
ScaleData() |>
RunPCA() |>
FindNeighbors(reduction = "pca", dims = 1:30) |>
FindClusters(verbose = FALSE) |>
RunUMAP(reduction = "pca", dims = 1:30)
Normalizing layer: counts.1.1
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Normalizing layer: counts.1.2
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Normalizing layer: counts.2.1
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Normalizing layer: counts.2.2
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Finding variable features for layer counts.1.1
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Finding variable features for layer counts.1.2
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Finding variable features for layer counts.2.1
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Finding variable features for layer counts.2.2
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Centering and scaling data matrix
|
| | 0%
|
|==================== | 17%
|
|======================================== | 33%
|
|============================================================ | 50%
|
|================================================================================ | 67%
|
|==================================================================================================== | 83%
|
|========================================================================================================================| 100%
PC_ 1
Positive: H19, Igf2, Lgals1, Col1a1, Col1a2, Serpinh1, Igfbp5, Hbb-bs, Sparc, Fn1
Fstl1, Col5a2, Hba-a1, Col6a1, Anxa2, Col5a1, Hbb-bt, Hba-a2, S100a11, Gpc3
Cdkn1c, Lum, Tpm1, Lox, Ogn, Ahnak, Aspn, Dlk1, Col3a1, Igfbp4
Negative: Tuba1a, Tubb2b, Nsg2, Tubb3, Rtn1, Sez6, Gpm6a, Neurod2, Tbr1, Stmn2
Tmsb4x, Stmn3, Crmp1, Nnat, Tubb5, Mllt11, Sox11, Zbtb18, Stmn1, Mpped1
Uchl1, Cntn2, Neurod6, Enc1, Map2, Dpysl5, Igfbpl1, Tagln3, Islr2, Nsg1
PC_ 2
Positive: Col3a1, Igfbp4, Col1a2, Bgn, Col1a1, Sparc, Col5a2, Rcn3, Lum, Serpinh1
Fn1, Dcn, Fbln2, Postn, Itm2a, Maged2, Lgals1, Ptn, Tmsb10, Sulf2
Rrbp1, Lrp1, Ppic, Ssr2, Lamb1, Fkbp10, Col5a1, Calu, P3h3, Pcolce
Negative: Gm42418, Hbb-y, Hba-x, Hsd3b6, Lars2, Neurog2, Hbb-bh1, Alas2, Hba-a2, Hba-a1
Id4, Slc25a37, Malat1, Tent5c, Tcf4, Pabpc1, Hbb-bt, Hbb-bs, Mkrn1, Fam210b
Gypa, Fabp7, Ybx1, Lhx2, Aldoc, Pou3f3, Ctse, Fech, Ttyh1, Foxg1
PC_ 3
Positive: Lhx2, Rnd2, Eomes, Aldoc, Cdk2ap1, Sox3, Rcor2, Ccnb1, Tuba1c, Hnrnpa2b1
Sstr2, Abracl, Nt5dc2, Emx1, Neurog2, Id4, Dut, Igfbp2, Rrm2, Ccna2
Masp1, Nhlh1, Ttyh1, Cfl1, Slc30a10, Hnrnpab, Alyref, Celsr1, Sall1, AW047730
Negative: Malat1, Sst, Mapt, Pabpc1, Snca, Celf4, Bc1, Sobp, Stmn4, Hsd3b6
Mkrn1, Slc6a1, Slc25a37, Chl1, Hbb-y, Hba-a1, Ina, Ankrd12, Hbb-bt, Syt1
Tent5c, Gad2, Ppp1r14c, Alas2, Gabra2, Ntm, Nrxn3, Hba-x, Nrxn1, Grin2b
PC_ 4
Positive: Ibsp, Spp1, Panx3, Alpl, Kazald1, Ifitm5, Col11a2, Sp7, Capn6, Sgms2
Actc1, Slc13a5, Itga10, Cgref1, Fabp4, Smpd3, Ambn, Npnt, Dmp1, Chrdl1
Dlx6, Fkbp11, Phex, Crygc, Mylpf, Cryaa, Ramp1, Matn1, Myl4, Myh3
Negative: Ccnd2, Apcdd1, Crabp1, Krt5, Slc2a1, Krt14, Apod, Col4a1, Arhgap11a, Col18a1
Cacng4, Col4a2, Perp, Igfbp7, Gxylt1, Sparcl1, Gjb2, Sfn, Cyb5r3, Bcam
Ablim1, Dynll2, Igfbp2, Wnt4, Adgrf5, Cldn5, Irx1, Wnt6, Cd34, Zeb1
PC_ 5
Positive: Cldn11, Vtn, Zic1, Ccnd2, Atp1a2, Gm42418, Cxcl12, Lars2, Cldn5, Cfh
Slco1c1, Nid2, Foxd1, Cacng4, Arhgap11a, Slc22a6, Map1b, Zeb1, Epha5, Col2a1
Crispld1, Selenop, Fabp7, Tsc22d1, Cyp1b1, Cenpb, Nupr1, Slc7a1, Reln, Bmp6
Negative: Cxcl14, Dlk1, Twist2, Gipr, Sfn, Krt5, Irx1, Perp, Vgll3, Krt14
Hoxd8, Thy1, Adam33, Irx2, Ntn1, Vcam1, Pkp3, Krt1, Osr2, Dpt
Ptpro, Rgs6, Sim1, Vegfd, Tmem229b, Atrnl1, Twist1, Adgrb2, Crabp1, Sulf1
Computing nearest neighbor graph
Computing SNN
12:08:48 UMAP embedding parameters a = 0.9922 b = 1.112
12:08:48 Read 335 rows and found 30 numeric columns
12:08:48 Using Annoy for neighbor search, n_neighbors = 30
12:08:48 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
12:08:48 Writing NN index file to temp file /var/folders/03/fbk073850ml4ww5j08pc82t00000gn/T//RtmpfEMMJA/file3901c497c4f
12:08:48 Searching Annoy index using 1 thread, search_k = 3000
12:08:48 Annoy recall = 100%
12:08:48 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 30
12:08:48 Initializing from normalized Laplacian + noise (using RSpectra)
12:08:48 Commencing optimization for 500 epochs, with 13250 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
12:08:48 Optimization finished
#4 is blood cells #2 Bone progenitors, Sp7 Pdpn #0 cranial mesenchyme/arachnoid/dura #3 pia/arachnoid Lama2, NGfr, Rdh10 - leptomeninges #1 Brain/mesenchyme
#1,3 and 0 has meninges clusters compare gene expression
# Normalize data and find variable features for Visium data
merge.all.int.subset <- merge.all.int.subset |>
NormalizeData() |>
FindVariableFeatures(nfeatures = 6000) |>
ScaleData() |>
RunPCA() |>
FindNeighbors(reduction = "pca", dims = 1:30) |>
FindClusters(verbose = FALSE) |>
RunUMAP(reduction = "pca", dims = 1:30)
Normalizing layer: counts
Performing log-normalization
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Finding variable features for layer counts
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Centering and scaling data matrix
|
| | 0%
|
|==================== | 17%
|
|======================================== | 33%
|
|============================================================ | 50%
|
|================================================================================ | 67%
|
|==================================================================================================== | 83%
|
|========================================================================================================================| 100%
Warning: Different features in new layer data than already exists for scale.dataPC_ 1
Positive: H19, Igf2, Lgals1, Col1a1, Sparc, Col1a2, Serpinh1, Fn1, Col3a1, Igfbp4
Col5a2, Cdkn1c, Anxa2, Col5a1, S100a11, Igfbp5, Fstl1, Lum, Col6a1, Postn
Gpc3, Dlk1, Bgn, Dcn, Lox, Aspn, Ogn, Ahnak, Col6a3, Rcn3
Negative: Tuba1a, Tubb2b, Nsg2, Tubb3, Rtn1, Tubb5, Gpm6a, Sez6, Sox11, Neurod2
Tmsb4x, Stmn2, Nnat, Tbr1, Stmn3, Crmp1, Zbtb18, Uchl1, Stmn1, Mllt11
Mpped1, Cd24a, Neurod6, Map2, Foxg1, Tagln3, Cntn2, Igfbpl1, Bex2, Dcx
PC_ 2
Positive: Sst, Tmsb10, Col3a1, Nenf, Tubb2a, Ptn, Rcn3, Lum, Col1a2, Igfbp4
Dcn, Bgn, Cxcl12, Col1a1, Col5a2, Apod, Serpinh1, Meg3, Atp9a, P3h3
Fbln2, Timp2, Sulf2, Itm2a, Fbn1, Nbl1, Sparc, Dner, Lamb1, Fkbp10
Negative: Neurog2, Lhx2, Hmgb2, H2afz, Id4, Aldoc, Hnrnpa1, Gm42418, Ttyh1, Eomes
Fabp7, Lars2, Sall1, Rnd2, Sox3, Insm1, Cdk2ap1, Pantr1, Nfix, Nfia
Nr2e1, Emx1, Sox2, Dll1, Neurod1, Pgk1, Ube2c, Nfib, Pkm, Pou3f3
PC_ 3
Positive: Pkm, Eif4a1, Ldha, Cdk4, Rps7, Ndufa4, Cfl1, Lsm7, Actg1, Tuba1c
Dynll1, Rnd2, Cox4i1, Igfbp2, Ppdpf, Ubl5, Atp5mpl, Sstr2, Higd1a, H2afz
Igsf8, Ewsr1, Alyref, Odc1, Dazap1, Ilf2, Lhx2, Rcor2, Emx1, Ubb
Negative: Malat1, Lars2, Gm42418, mt-Atp8, Bc1, mt-Nd4l, Akap9, Celf2, Ankrd12, Nrxn3
Rbfox1, Map1b, Sobp, Ttc28, Mapt, Celf4, Hbb-y, Snhg14, Arid4a, Basp1
Csrnp3, Crybb1, Cacng4, Cryaa, Pak3, Nrxn1, 4632427E13Rik, Zmym6, Mir124-2hg, Crybb3
PC_ 4
Positive: Ibsp, Spp1, Alpl, Kazald1, Panx3, Ifitm5, Col11a2, Sp7, Capn6, Sgms2
Vdr, Actc1, Dmp1, Bglap2, Slc13a5, Fabp4, Cgref1, Smpd3, Itga10, Npnt
Ambn, Chrdl1, Dlx6, Mylpf, Fkbp11, Phex, Crygd, Myl4, Cryaa, Crygc
Negative: Ccnd2, Apcdd1, Krt5, Krt14, Crabp1, Apod, Arhgap11a, Col4a1, Slc2a1, Cacng4
Col18a1, Perp, Gjb2, Cyb5r3, Igfbp2, Gxylt1, Sfn, Col4a2, Sparcl1, Bcam
Dynll2, Wnt4, Igfbp7, Cldn5, Irx1, Wnt6, Apoe, Atp1a2, Selenop, Zeb1
PC_ 5
Positive: Cxcl14, Dlk1, Twist2, Vgll3, Agtr2, Osr2, Ntn1, Dpt, Vegfd, Adam33
Meg3, Hoxd8, Irx1, Gm5084, Sfrp2, Nrk, Twist1, Vcam1, Krt5, AW551984
Gas1, Wnt5a, Irx2, Sulf1, Perp, Arap1, Atrnl1, Megf6, Sim1, Col6a1
Negative: Cldn11, Vtn, Cldn5, Atp1a2, Zic1, Nupr1, Slco1c1, Cfh, Slc38a3, Foxd1
Ccnd2, Col2a1, Slc22a6, Cxcl12, Slc7a1, Cyp1b1, Enpp2, Epas1, Slc6a13, Shisa3
Crispld1, Slc38a5, Bmp6, Col4a1, Col9a3, Lsr, Gja1, Cthrc1, Nid2, Fxyd5
Computing nearest neighbor graph
Computing SNN
13:43:55 UMAP embedding parameters a = 0.9922 b = 1.112
13:43:55 Read 313 rows and found 30 numeric columns
13:43:55 Using Annoy for neighbor search, n_neighbors = 30
13:43:55 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:43:55 Writing NN index file to temp file /var/folders/03/fbk073850ml4ww5j08pc82t00000gn/T//RtmpfEMMJA/file3901f6af68e
13:43:55 Searching Annoy index using 1 thread, search_k = 3000
13:43:55 Annoy recall = 100%
13:43:55 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 30
13:43:55 Initializing from normalized Laplacian + noise (using RSpectra)
13:43:55 Commencing optimization for 500 epochs, with 12480 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:43:56 Optimization finished
saveRDS(merge.all.int.subset, "./OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/merge.all.int.subset.rds")
Warning: cannot open compressed file './OneDrive - The University of Colorado Denver/10xVisium/Spatial/RDSfiles/merge.all.int.subset.rds', probable reason 'No such file or directory'Error in gzfile(file, mode) : cannot open the connection
meningesonly <- SubsetSTData(merge.all.int.subset, idents = c("Pia/Arachnoid", "Brain/Pia", "Cranial Mesenchyme/Arachnoid/Dura"))
Error in WhichCells.Seurat(object = x, cells = cells, idents = idents, :
Cannot find the following identities in the object: Cranial Mesenchyme/Arachnoid/Dura
DotPlot(meningesonly, features = c("Cxcl12", "Rdh10", "Aldh1a2", "S100a6", "Crabp2", "Gja1", "Cldn11", dot.scale = 40))
Warning: The following requested variables were not found: 40Warning: Scaling data with a low number of groups may produce misleading results